package com.app.android.coliy.adapter;

import android.graphics.Color;

import androidx.annotation.NonNull;

import com.app.android.coliy.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

public class ColorAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public ColorAdapter() {
        super(R.layout.layout_item_color);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, String item) {

        if (item != null) {
            helper.setBackgroundColor(R.id.ll_color_bg, Color.parseColor(item));
        }
    }
}
